<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>类型转换</title>
</head>
<body>
  
</body>
<script>
  // 显示转换
  const a = {}
  const b = function() {console.log(2)}
  console.log(a + b)
 
  class Parent{
    constructor(name,age) {
    this.name = name
    this.age = age
    this.show = function() {console.log(11)}
  }
  hello () {
    console.log(123)
  }
  test = () => {
    console.log(22)
  }
  static show = function() { console.log(1)} // 静态方法
  }
  console.log(Parent.show())
  class Child extends Parent {
    constructor(name, age) {
      super(name,age)
    }
  }
  const child =new Child('zhangil', '32')
  console.log(child)
</script>
</html>